---
published_at: 2024-01-24 08:00:00
---

_January 24, 2024_

# Announcing Rsdoctor 0.1

<picture>
  <img
    alt="Rsdoctor Banner"
    src="https://github.com/web-infra-dev/rsdoctor/assets/7237365/0f9d2e86-d919-451a-befa-fa84603a87cf"
    style={{ margin: 'auto' }}
  />
</picture>

We are excited to announce the release of [Rsdoctor](https://rsdoctor.rs/) 0.1!

Rsdoctor is a one-stop build analyzer for Rspack and Webpack. It allows for detailed analysis of the build process and bundles, making the build process more visual and transparent.

## 📌 Position

**Rsdoctor** is a build analyzer for analyzing projects built with [Rspack](https://www.rspack.rs/) and [Webpack](https://webpack.js.org/). It supports analysis of projects such as [Rsbuild](https://rsbuild.rs/), [Create React App](https://create-react-app.dev/), [Modern.js](https://modernjs.dev/), and more.

![Position](https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-position.png)

## 🔥 Features

- **Compilation Visualization**: Rsdoctor visualizes the compilation behavior and time consumption, making it easy to view build issues.
- **Multiple Analysis Capabilities**: Rsdoctor supports build artifact, build-time analysis, and anti-degradation capabilities:
  - Build artifact support for resource lists and module dependencies, etc.
  - Build-time analysis supports Loader, Plugin, and Resolver building process analysis, including Rspack's builtin loaders.
  - Build rules support duplicate package detection and ES Version Check, etc.
  - Currently, bundle diff capabilities are also available.
- **Support Custom Rules**: In addition to built-in build scan rules, Rsdoctor also supports users adding custom component scan rules based on the build data of Rsdoctor.
- **Framework-Independent**: Rsdoctor support all projects built on Rspack or webpack.

## 🛠️ Introduction

### ⭐️ Overview

- The overview page (i.e. the home page) can know **project configuration, diagnostic information, compilation information, and product status**.

![Overall](https://assets.rspack.rs/others/assets/rsdoctor/project-overall-1.jpg)

- In addition to the project overview, we also provide diagnostic functions, including compilation diagnostics and duplicate packages diagnostics. If your compilation and products hit the diagnostic rules we defined,
  the corresponding warning alerts will appear on the tool's home page. **where you can see the detailed reference path of duplicate packages**:

![Overall-Alerts](https://assets.rspack.rs/others/assets/rsdoctor/overall-alerts.png)

### ⭐️ Compilation analysis

Provides corresponding data and analysis functions for **Loaders, Plugins, and Module Resolve** to help you analyze problems in the compilation process.

#### Loader analysis

- This module mainly provides the function of data analysis such as input and output, estimated time consumption, and parameters within **Rspack or webpack Loaders**.

<div style={{ display: 'flex' }}>
  <img
    src="https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-loader-timeline.png"
    width="55%"
    style={{ margin: 'auto' }}
  />
  <img
    src="https://assets.rspack.rs/others/assets/rsdoctor/loader-analysis-all.png"
    width="45%"
    style={{ margin: 'auto' }}
  />
</div>

#### Plugin analysis

- This module mainly intercepts and collects data information such as the number of calls and estimated time consumption of Plugins.

<p>
  <img
    alt="bundle"
    src={'https://assets.rspack.rs/others/assets/rsdoctor/compile-plugin.jpg'}
    width="600px"
    style={{ margin: 'auto' }}
  />
</p>

#### Resolve analysis

- This module mainly provides path data and estimated time consumption for module resolution in a single file within the project. Rspack does not currently support this module.

<p>
  <img
    alt="bundle"
    src={'https://assets.rspack.rs/others/assets/rsdoctor/resolver.png'}
    width="700px"
    style={{ margin: 'auto' }}
  />
</p>

### ⭐️ Product analysis

- In the **Bundle Size** page, we can see an overview of the product data information of the current project, as well as analyze the size and reasons for duplicate package imports.

- In addition, we can also use the **Bundle Analysis** page to further analyze the relationship between the product and module in the current product, size data and other information, as well as the reasons for module introduction.

<p>
  <img
    alt="bundle"
    src={
      'https://assets.rspack.rs/others/assets/rsdoctor/bundle-size-overall.png'
    }
    width="700px"
    style={{ margin: 'auto' }}
  />
</p>

## 📚 Quick start

You can refer to the [Quick Start](https://rsdoctor.rs/guide/start/quick-start) to get started with **Rsdoctor**.

## 💡 Next steps

**Improve Rsdoctor build analysis efficiency**: Currently, enabling Rsdoctor plugin increases project build time. In the next step, we will extract and convert some of Rsdoctor's build analysis logic into a rust plugin, built-in to [Rspack](https://www.rspack.rs/), in order to improve Rsdoctor's build analysis efficiency.

## Acknowledgements

**Rsdoctor** has been inspired by outstanding projects in the community, and we would like to express our gratitude to them:

- Refer to the analysis logic of artifact relationships from [bundle-stats](https://github.com/relative-ci/bundle-stats/tree/master/packages/cli#readme).
- Refer to the module breakdown and analysis logic from [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer).
- [Statoscope](https://github.com/statoscope/statoscope/blob/master/README.md) is an excellent tool for analyzing build artifacts, and Rsdoctor is inspired by it in terms of build analysis.
- [Webpack team and community](https://github.com/webpack/webpack/blob/main/README.md) have created an excellent bundling tool and a rich ecosystem.
- [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) has inspired Rsdoctor's exploration of build process analysis.
